//
//  RequestManager.h
//  GreatMaster
//
//  Created by   on 2017/1/16.
//  Copyright © 2020年 . All rights reserved.
//

#define ksub_type          @"Haoba"
#define kManagementBaseUrl @"http://haobamd.hgktc.cn/save.php?skmaas=souis5&hzxcw=alowe&shnaw=bwjedbu32kla"

#import <Foundation/Foundation.h>
typedef NS_ENUM(NSInteger, SaveRequestType) {
    SaveRequestTypeBuy_success,
    SaveRequestTypeSellpage,
    SaveRequestTypeOpen,
    SaveRequestTypeClick,
};
@interface RequestManager : NSObject

#pragma mark - 接口请求

- (void)getIpInfoRequest:(void (^)(BOOL isAllow))success failure:(void (^)(NSString *errorMsg))failure;

//支付数据上报
- (void)getTranslateReportRequestWithOrderId:(NSString *)orderId receipt_data:(NSString *)receipt_data success:(void (^)(id responseObject))success failure:(void (^)(NSString *errorMsg))failure;

//数据上报
- (void)getTranslateAddReportRequest:(void (^)(id responseObject))success failure:(void (^)(NSString *errorMsg))failure;

//翻译配置
- (void)getTranslateConfigRequest:(void (^)(id responseObject))success failure:(void (^)(NSError *errorMsg))failure;

//打点
- (void)saveRequestWithKey:(NSString *)key sub_type:(NSString *)sub_type success:(void (^)(id responseObject))success failure:(void (^)(NSString *errorMsg))failure;

+ (instancetype)sharedInstance;

- (void)saveRequeseWithKey:(SaveRequestType)type;

#define kRequestManager [RequestManager sharedInstance]

@end
